__author__ = 'CrazyCode'

"""
    Operating System Interface
    The os module provides dozens of functions for interacting with operating system

    Be sure to use the import os style instead of from os import * .
    This will keep os.open() from shadowing the built-in open() function which operates much differently.

    The built-in dir() and help() functions are useful as interactive aids for working with large modules like os:


    File Wildcards
    The glob module provides a function for making file lists from directory wildcard searches:


    Command Line Arguments
    Common utility scripts often need to process command line arguments.
    These arguments are stored in the sys module's argv attribute as a list. For instance the following output results from running python demo.py ont two three at the command line:


    Error Output Redirection and Program Termination
    The sys module also has attribute for stdin , stdout and stderr.
    The latter is useful for emitting warnings and error messages to make them visible even when stdout has been redirected.


    String Pattern Matching
    The re modul provides regular exception tools for adcanced string processing.
    For complex matching and manipulcation , reguar exception offer succinct , optimized solutions :



"""

import os
import glob
import sys
import re

# print(os.getcwd())
# dir(os)
# help(os)

# glob.glob("*.py")

# print(sys.argv)

str1 = re.findall(r"\bf[a-z]]", "which foot or hand fell fasetest")
str2 = re.sub(r"(\b[a-z]+])\1", r"\1", "cat in the hat")

print(str1)
print(str2)